当前位置: 首页>>代码示例>>C#>>正文


C# Update.ShowDialog方法代码示例

本文整理汇总了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});
            });
        }
开发者ID:BrianMMcClain,项目名称:ironfoundry,代码行数:40,代码来源:CloudFoundryPackage.cs

示例2: button2_Click

 private void button2_Click(object sender, EventArgs e)
 {
     this.Hide();
     Update Import = new Update();
     Import.ShowDialog();
 }
开发者ID:andreidana,项目名称:NETOld,代码行数:6,代码来源:Main.cs

示例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);
                }
            }
        }
开发者ID:CalvertYang,项目名称:WFTP,代码行数:43,代码来源:Query.xaml.cs

示例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);

            }
        }
开发者ID:tehjrow,项目名称:ConversionManager,代码行数:14,代码来源:MainWindow.xaml.cs


注:本文中的Update.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。