CloseWindow() public method

Close Edit Window and Cleanup Resource
public CloseWindow ( ) : void
return void
Exemplo n.º 1
0
 partial void OnCancel(MonoMac.Foundation.NSObject sender)
 {
     lock (loginLock)
     {
         isClosed = true;
     }
     Loader.Cancel();
     RemoveEvent();
     Controller.CloseWindow();
 }
Exemplo n.º 2
0
        public override void PerformClose(NSObject sender)
        {
            base.OrderOut(this);

            if (Program.UI != null)
            {
                Program.UI.UpdateDockIconVisibility();
            }

            Controller.CloseWindow();

            return;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public Edit(CmisRepoCredentials credentials, string name, string remotePath, List <string> ignores, string localPath)
        {
            Name             = name;
            this.credentials = credentials;
            this.remotePath  = remotePath;
            this.Ignores     = ignores;
            this.localPath   = localPath;

            CreateEdit();

            Deletable = true;

            DeleteEvent += delegate(object sender, DeleteEventArgs args) {
                args.RetVal = false;
                Controller.CloseWindow();
            };

            Controller.OpenWindowEvent += delegate
            {
                ShowAll();
                Activate();
            };
        }
Exemplo n.º 4
0
 partial void OnCancel(MonoMac.Foundation.NSObject sender)
 {
     Loader.Cancel();
     RemoveEvent();
     Controller.CloseWindow();
 }
Exemplo n.º 5
0
        /// <summary>
        /// Constructor
        /// </summary>
        public Edit(EditType type, CmisRepoCredentials credentials, string name, string remotePath, List <string> ignores, string localPath)
        {
            FolderName       = name;
            this.Credentials = credentials;
            this.remotePath  = remotePath;
            this.Ignores     = new List <string>(ignores);
            this.localPath   = localPath;
            this.type        = type;
            this.backgroundWorker.WorkerSupportsCancellation = true;
            this.backgroundWorker.DoWork             += CheckPassword;
            this.backgroundWorker.RunWorkerCompleted += PasswordChecked;

            CreateTreeView();
            LoadEdit();
            switch (type)
            {
            case EditType.EditFolder:
            //  GUI workaround to remove ignore folder {{
            //tab.SelectedItem = tabItemSelection;
            //break;
            //  GUI workaround to remove ignore folder }}
            case EditType.EditCredentials:
                tab.SelectedItem = tabItemCredentials;
                break;

            default:
                break;
            }

            this.Title       = Properties_Resources.EditTitle;
            this.Description = "";
            this.ShowAll();

            // Defines how to show the setup window.
            Controller.OpenWindowEvent += delegate
            {
                Dispatcher.BeginInvoke((Action) delegate
                {
                    Show();
                    Activate();
                    BringIntoView();
                });
            };

            Controller.CloseWindowEvent += delegate
            {
                Close();
            };

            finishButton.Click += delegate
            {
                Ignores = NodeModelUtils.GetIgnoredFolder(repo);
                Credentials.Password = passwordBox.Password;
                Controller.SaveFolder();
                Controller.CloseWindow();
            };

            cancelButton.Click += delegate
            {
                Controller.CloseWindow();
            };

            Closed += delegate
            {
                Controller.CleanWindow();
            };
        }
Exemplo n.º 6
0
 protected override void Close(object sender, CancelEventArgs args)
 {
     backgroundWorker.CancelAsync();
     backgroundWorker.Dispose();
     Controller.CloseWindow();
 }