本文整理汇总了C#中Update.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Update.ShowDialog方法的具体用法?C# Update.ShowDialog怎么用?C# Update.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Update
的用法示例。
在下文中一共展示了Update.ShowDialog方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateApplication
private void UpdateApplication(object sender, EventArgs e)
{
var project = vsMonitorSelection.GetActiveProject();
if (project == null)
return;
var cloudGuid = GetCurrentCloudGuid(project);
var projectDirectories = GetProjectDirectories(project);
Messenger.Default.Register<NotificationMessageAction<Guid>>(this,
message =>
{
if (message.Notification.Equals(Messages.SetUpdateAppData))
message.Execute(cloudGuid);
});
Messenger.Default.Register<NotificationMessageAction<string>>(this,
message =>
{
if (message.Notification.Equals(Messages.SetPushAppDirectory))
message.Execute(projectDirectories.DeployFromPath);
});
var window = new Update();
var helper = new WindowInteropHelper(window);
helper.Owner = (IntPtr)(dte.MainWindow.HWnd);
var result = window.ShowDialog();
if (!result.GetValueOrDefault())
return;
UpdateViewModel modelData = null;
Messenger.Default.Send(new NotificationMessageAction<UpdateViewModel>(Messages.GetUpdateAppData, model => modelData = model));
SetCurrentCloudGuid(project, modelData.SelectedCloud.ID);
PerformAction("Update Application", project, modelData.SelectedCloud, projectDirectories, (c, d) =>
{
c.Update(modelData.SelectedApplication.Name, d);
c.Restart(new Application {Name = modelData.SelectedApplication.Name});
});
}
示例2: button2_Click
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
Update Import = new Update();
Import.ShowDialog();
}
示例3: rmenuEdit_Click
/// <summary>
/// Context Menu 右鍵->編輯
/// </summary>
private void rmenuEdit_Click(object sender, RoutedEventArgs e)
{
// 每次編輯都要確認權限
if (!CheckRankOrActivity())
{
return;
}
if (lvwClassify.SelectedItems.Count != 1)
{
return;
}
// 只能選取才編輯, 因為最後一層 File 不能編輯所以不用處理 List Mode
else if (_isTileView)
{
StringBuilder pathServer = new StringBuilder();
StringBuilder pathId = new StringBuilder();
pathServer.Append(_ftpPath);
pathId.Append(_idPath);
Tile item = lvwClassify.SelectedItem as Tile;
Dictionary<string, string> tag = item.Tag as Dictionary<string, string>;
pathServer.Append(tag["Name"]);
pathId.Append(tag["Id"]);
Update getInput = new Update(400, 200, pathServer.ToString(), tag["NickName"]);
getInput.ShowDialog();
if (getInput.IsDone)
{
string newNickName = getInput.NickName;
string newSystemName = getInput.SystemName;
string rebuildPath = getInput.NewPath;
string rebuildPathId = pathId.ToString();
if (getInput.ClassifyId > 0)
{
rebuildPathId = "/" + getInput.ClassifyId + pathId.ToString().Substring(pathId.ToString().LastIndexOf('/'));
}
// 編輯更新欄位
RenameFolder(pathServer.ToString(), rebuildPathId, rebuildPath, newNickName);
}
}
}
示例4: conversionGrid_MouseDoubleClick
private void conversionGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
var currentItem = conversionGrid.SelectedItem as Item;
if (currentItem != null)
{
Update update1 = new Update(currentItem);
update1.ShowDialog();
fillOpenGrid();
fillCompletedGrid();
hideConversionColumns();
sortDataGrid(conversionGrid);
}
}