Esempio n. 1
0
        /// <summary>
        ///     Close current system
        /// </summary>
        private bool Close()
        {
            if (!LibraryData.SystemIsOpen)
            {
                return(true);
            }

            if (!IsInDesignMode)
            {
                var qq = new SystemFileSaveAsk();
                if (!qq.Save())
                {
                    return(false);
                }
            }

            LibraryData.CloseProject();
            TabCollection.RemoveAll(q => q is MainUnitViewModel || q is PanelViewModel);

            LibraryData.SystemFileName = string.Empty;

            RaisePropertyChanged(() => FileName);


            RaisePropertyChanged(() => InstallerVersion);
            return(true);
        }
Esempio n. 2
0
        public bool ExitCommand()
        {
            if (IsInDesignMode)
            {
                return(true);
            }
            if (LibraryData.SystemIsOpen)
            {
                if (IsInDesignMode)
                {
                    return(false);
                }
                var g = new SystemFileSaveAsk();
                return(g.Save());
            }

            Application.Current.Shutdown();
            return(true);
        }