Example #1
0
        private void MenuStripFileMergeItem_Click(object sender, EventArgs e)
        {
            MergeWith mergeForm = new MergeWith();

            mergeForm.ShowDialog();

            EntryBrowser.SetupRows();
        }
Example #2
0
        public void ImportFromPackageFile()
        {
            Import importDialog = new Import();

            importDialog.ShowDialog();

            EntryBrowser.SetupRows();
        }
Example #3
0
        private void AddEntryButton_Click(object sender, EventArgs e)
        {
            SelectorNew selectorNewForm = new SelectorNew();

            selectorNewForm.ShowDialog();

            STBLXMLEntry createdEntry = selectorNewForm.CreatedEntry;

            if (createdEntry == null)
            {
                return;
            }

            EntryBrowser.SetupRows();
            EntryBrowser.ScrollToItem(createdEntry, selectItem: true);
        }
Example #4
0
        public Selector()
        {
            InitializeComponent();

            EntryBrowser.SetupRows();

            UpdateStatusBarItemsLabel();
            UpdateStatusBarSelectedLabel();

            Loading.FileChanged += Loading_Changed;
            Loading.BecameClean += Loading_Changed;
            Loading.BecameDirty += Loading_Changed;

            EntryBrowser.ItemCountUpdate     += EntryBrowser_ItemCountUpdate;
            EntryBrowser.SelectedCountUpdate += EntryBrowser_SelectedCountUpdate;
        }
Example #5
0
        public bool OpenFile()
        {
            if (Loading.IsDirty)
            {
                DialogResult unsavedDialogResult = ShowUnsavedDialog();

                if (unsavedDialogResult == DialogResult.Yes)
                {
                    SaveFile();
                }
                else if (unsavedDialogResult == DialogResult.Cancel)
                {
                    return(false);
                }
            }

            if (Loading.FilePath != null)
            {
                OpenSTBLXMLDialog.InitialDirectory = Path.GetDirectoryName(Loading.FilePath);
            }

            if (OpenSTBLXMLDialog.ShowDialog() == DialogResult.Cancel)
            {
                return(false);
            }

            string openFilePath = OpenSTBLXMLDialog.FileName;

            OpenSTBLXMLDialog.InitialDirectory = "";
            OpenSTBLXMLDialog.FileName         = "";

            try {
                Loading.OpenFile(openFilePath);
            } catch (Exception openException) {
                ShowOpenFailureDialog(openException);
            }

            EntryBrowser.SetupRows();

            return(true);
        }
Example #6
0
        public bool NewFile()
        {
            if (Loading.IsDirty)
            {
                DialogResult unsavedDialogResult = ShowUnsavedDialog();

                if (unsavedDialogResult == DialogResult.Yes)
                {
                    SaveFile();
                }
                else if (unsavedDialogResult == DialogResult.Cancel)
                {
                    return(false);
                }
            }

            Loading.NewFile();
            EntryBrowser.SetupRows();

            return(true);
        }