Пример #1
0
        protected void StatusChanged(object sender, System.EventArgs e)
        {
            Engine.SyncOperationEventArgs soe = (Engine.SyncOperationEventArgs)e;
            switch (soe.SyncOperation)
            {
            default:
                StatusBar.Pop(1);
                StatusBar.Push(1, soe.SyncOperation.ToString() + "...");
                break;

            case Engine.SyncOperation.Failure:
                StatusBar.Pop(1);
                StatusBar.Push(1, "FLAGRANT SYSTEM ERROR!!!");
                Console.WriteLine(Engine.Sync.SyncException.ToString());
                cc.CommandState = CommandStates.FileOpened;
                break;

            case Engine.SyncOperation.Success:
                j.Save();
                StatusBar.Pop(1);
                StatusBar.Push(1, soe.SyncOperation.ToString());
                estore          = new Components.EntriesStore(j);
                tva.Model       = estore;
                cc.CommandState = CommandStates.FileOpened;
                break;
            }
        }
Пример #2
0
        internal void UpdateTreeView()
        {
            switch (treeViewState)
            {
            case TreeViewStates.Hidden:
                vbTreeView.Visible = false;
                break;

            case TreeViewStates.Entries:
                vbTreeView.Visible = true;
                tva.Columns        = entriesColumns;
                if (estore == null)
                {
                    estore = new Components.EntriesStore(j);
                }
                tva.Model = estore;
                break;

            case TreeViewStates.Comments:
                vbTreeView.Visible = true;
                tva.Columns        = commentsColumns;
                if (cstore == null)
                {
                    cstore = new Components.CommentsStore(j);
                }
                tva.Model = cstore;
                break;
            }
        }