本文整理汇总了C#中IFavorite类的典型用法代码示例。如果您正苦于以下问题:C# IFavorite类的具体用法?C# IFavorite怎么用?C# IFavorite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IFavorite类属于命名空间,在下文中一共展示了IFavorite类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FromCofigFavorite
internal override void FromCofigFavorite(IFavorite destination, FavoriteConfigurationElement source)
{
this.SSH1 = source.SSH1;
this.AuthMethod = source.AuthMethod;
this.CertificateKey = source.KeyTag;
this.SSHKeyFile = source.SSHKeyFile;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:SshOptions.cs
示例2: ToConfigFavorite
internal override void ToConfigFavorite(IFavorite source, FavoriteConfigurationElement destination)
{
destination.SSH1 = this.SSH1;
destination.AuthMethod = this.AuthMethod;
destination.KeyTag = this.CertificateKey;
destination.SSHKeyFile = this.SSHKeyFile;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:SshOptions.cs
示例3: GetSize
public static Size GetSize(Connection connection, IFavorite favorite)
{
int height = favorite.Display.Height;
int width = favorite.Display.Width;
switch (favorite.Display.DesktopSize)
{
case DesktopSize.x640:
return new Size(640, 480);
case DesktopSize.x800:
return new Size(800, 600);
case DesktopSize.x1024:
return new Size(1024, 768);
case DesktopSize.x1152:
return new Size(1152, 864);
case DesktopSize.x1280:
return new Size(1280, 1024);
case DesktopSize.FullScreen:
width = Screen.FromControl(connection).Bounds.Width - 13;
height = Screen.FromControl(connection).Bounds.Height - 1;
return GetMaxAvailableSize(width, height);
case DesktopSize.FitToWindow:
case DesktopSize.AutoScale:
width = connection.Parent.Width;
height = connection.Parent.Height;
return GetMaxAvailableSize(width, height);
default:
return new Size(width, height);
}
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:30,代码来源:ConnectionManager.cs
示例4: LoadFrom
public void LoadFrom(IFavorite favorite)
{
this.FillDisplayControls(favorite);
var rdpOptions = favorite.ProtocolProperties as RdpOptions;
if (rdpOptions != null)
this.FillRdpDisplayControls(rdpOptions);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:RdpDisplayControl.cs
示例5: LoadFrom
internal void LoadFrom(IFavorite favorite)
{
foreach (var protocolControl in this.Controls.OfType<IProtocolOptionsControl>())
{
protocolControl.LoadFrom(favorite);
}
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:ProtocolOptionsPanel.cs
示例6: NewTerminalForm
public NewTerminalForm(IPersistence persistence, IFavorite favorite)
: this()
{
this.persistence = persistence;
this.InitializeFavoritePropertiesControl();
this.Init(favorite, String.Empty);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:NewTerminalForm.cs
示例7: SaveTo
public void SaveTo(IFavorite favorite)
{
this.FillFavoriteDisplayOptions(favorite);
var rdpOptions = favorite.ProtocolProperties as RdpOptions;
if (rdpOptions != null)
this.FillFavoriteRdpDisplayOptions(rdpOptions);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:RdpDisplayControl.cs
示例8: CheckForTerminalServer
public void CheckForTerminalServer(IFavorite favorite)
{
if (favorite.Protocol == ConnectionManager.RDP)
ThreadPool.QueueUserWorkItem(new WaitCallback(this.CheckForTS), favorite);
this.IsTerminalServer = false;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:Connection.cs
示例9: FillDisplayControls
private void FillDisplayControls(IFavorite favorite)
{
this.cmbResolution.SelectedIndex = (Int32)favorite.Display.DesktopSize;
this.cmbColors.SelectedIndex = (Int32)favorite.Display.Colors;
this.widthUpDown.Value = favorite.Display.Width;
this.heightUpDown.Value = favorite.Display.Height;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:RdpDisplayControl.cs
示例10: Copy
/// <summary>
/// Creates deep copy of provided favorite in persistence including its toolbar button and groups memebership.
/// The copy is already added to the persistence.
/// Returns newly created favorite copy if operation was successfull; otherwise null.
/// </summary>
internal IFavorite Copy(IFavorite favorite)
{
if (favorite == null)
return null;
return this.CopyUsingPrompt(favorite);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:12,代码来源:CopyFavoriteCommand.cs
示例11: Validate
internal static ValidationStates Validate(IFavorite favorite)
{
List<ValidationState> results = ValidateObject(favorite);
var executeResults = ValidateObject(favorite.ExecuteBeforeConnect);
results.AddRange(executeResults);
return new ValidationStates(results);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:7,代码来源:Validations.cs
示例12: LoadFrom
public void LoadFrom(IFavorite favorite)
{
this.chkExecuteBeforeConnect.Checked = favorite.ExecuteBeforeConnect.Execute;
this.txtCommand.Text = favorite.ExecuteBeforeConnect.Command;
this.txtArguments.Text = favorite.ExecuteBeforeConnect.CommandArguments;
this.txtInitialDirectory.Text = favorite.ExecuteBeforeConnect.InitialDirectory;
this.chkWaitForExit.Checked = favorite.ExecuteBeforeConnect.WaitForExit;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:ExecuteControl.cs
示例13: ConvertDisplay
private static void ConvertDisplay(IFavorite result, FavoriteConfigurationElement sourceFavorite)
{
IDisplayOptions display = result.Display;
display.Colors = sourceFavorite.Colors;
display.DesktopSize = sourceFavorite.DesktopSize;
display.Width = sourceFavorite.DesktopSizeWidth;
display.Height = sourceFavorite.DesktopSizeHeight;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:ModelConverterV1ToV2.cs
示例14: CopyUsingPrompt
private IFavorite CopyUsingPrompt(IFavorite favorite)
{
InputBoxResult result = this.copyPrompt();
if (result.ReturnCode == DialogResult.OK && !string.IsNullOrEmpty(result.Text))
return this.CopySelectedFavorite(favorite, result.Text);
return null;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:CopyFavoriteCommand.cs
示例15: ConvertDisplay
private static void ConvertDisplay(FavoriteConfigurationElement result, IFavorite sourceFavorite)
{
IDisplayOptions display = sourceFavorite.Display;
result.Colors = display.Colors;
result.DesktopSize = display.DesktopSize;
result.DesktopSizeWidth = display.Width;
result.DesktopSizeHeight = display.Height;
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:ModelConverterV2ToV1.cs
示例16: AddFavoriteIntoGroups
internal static void AddFavoriteIntoGroups(IPersistence persistence, IFavorite toPerisist, IEnumerable<string> validGroupNames)
{
foreach (string groupName in validGroupNames)
{
IGroup group = FavoritesFactory.GetOrAddNewGroup(persistence, groupName);
group.AddFavorite(toPerisist);
}
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:ImportWithDialogs.cs
示例17: Add
public void Add(IFavorite favorite)
{
if (AddToCache(favorite))
{
this.dispatcher.ReportFavoriteAdded(favorite);
this.persistence.SaveImmediatelyIfRequested();
}
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:Favorites.cs
示例18: UpdateFavoriteUrl
internal static void UpdateFavoriteUrl(IFavorite destination, string newAbsoluteUrl)
{
var webOptions = destination.ProtocolProperties as WebOptions;
if (webOptions != null)
{
webOptions.UpdateMyFavoriteUrl(destination, newAbsoluteUrl);
}
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:WebOptions.cs
示例19: SaveTo
public void SaveTo(IFavorite favorite)
{
var rdpOptions = favorite.ProtocolProperties as RdpOptions;
if (rdpOptions == null)
return;
FillFavoriteTSgatewayOptions(rdpOptions);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:RdpTsGatewayControl.cs
示例20: LoadFrom
public void LoadFrom(IFavorite favorite)
{
var rdpOptions = favorite.ProtocolProperties as RdpOptions;
if (rdpOptions == null)
return;
FillTsGatewayControls(rdpOptions);
}
开发者ID:oo00spy00oo,项目名称:SharedTerminals,代码行数:8,代码来源:RdpTsGatewayControl.cs
注:本文中的IFavorite类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论