private void m_btnLogBuilder_Click(object sender, EventArgs e)
        {
            try
            {
                if (m_loggerTypes.SelectedItem.ToString() == typeof(ContinuesBinaryFileLogger).Name)
                {
                    var fileStremProvider = new FileStreamProvider(new FileConfiguration()
                                                                   {
                                                                       FilePath = m_txtPath.Text,
                                                                   });
                    var fileLogger = new ContinuesBinaryFileLogger(fileStremProvider, ((SubmiterOption)m_submitterType.SelectedItem).SubmitLogEntryFactory, ((BufferOption)m_bufferTypes.SelectedItem).BufferAllocatorFactory);
                    fileLogger.AttachToTunnelLog(LogTunnel);

                    var tabPage = new TabPage("BinaryFile " + System.IO.Path.GetFileName(m_txtPath.Text));
                    TreeListView dataTreeListView = new TreeListView();
                    dataTreeListView.Dock = DockStyle.Fill;
                    tabPage.Controls.Add(dataTreeListView);
                    var logAppender = new TreeViewLogAppender(dataTreeListView);
                    PreviewTabControl.TabPages.Add(tabPage);
                    logAppender.OpenFile(fileStremProvider.FileName);
                }
                else if (m_loggerTypes.SelectedItem.ToString() == "In Memory")
                {
                    var fileLogger = new ContinuesBinaryFileLogger(new InMemoryStreamProvider(), ((SubmiterOption)m_submitterType.SelectedItem).SubmitLogEntryFactory, ((BufferOption)m_bufferTypes.SelectedItem).BufferAllocatorFactory);
                    fileLogger.AttachToTunnelLog(LogTunnel);
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
        public PluginTreeView()
        {
            InitializeComponent();
            TlvControl = tlvPluginList;

            SetupTree();
        }
Example #3
0
        public TreeListFileExplorer(TreeListView treeListView)
        {
            treeListView.NodeExpanding += treeListView_NodeExpanding;

            Helper = new FileSystemHelper();
            InitDrives(treeListView);
        }
Example #4
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote row = document.FindOutlinerNoteById(__NodeId);
            MainWindow window = DragDropHelper.GetMainWindow(treeListView);

            if (window != null && row != null)
                window.DoHoist(row);
        }
Example #5
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);
            __SavedNote = note;
            __ColumnIndexBeforeUndo = DocumentHelpers.GetFocusedColumnIdx(treeListView, note);

            DocumentHelpers.DeleteRow(note, treeListView, __ColumnIndexAfterInsert);
        }
        public TreeViewLogAppender(TreeListView logTreeView)
        {
            m_logTreeView = logTreeView;
            InitDataTreeView();
            m_logTreeView.CanExpandGetter = CanExpandGetter;
            m_logTreeView.ChildrenGetter = ChildrenGetter;

            m_logTreeView.CheckBoxes = false;
        }
Example #7
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            var note = document.FindOutlinerNoteById(__NoteId);
            if (note == null)
                return;

            note.Document.FocusEditAfterTemplateChange = true;
            note.RemoveInlineNoteIfEmpty();
        }
Example #8
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            BaseStyle style = document.Styles.GetStyleByTag(__StyleTag);

            style.Properties.Clear();
            for (int i = 0; i < __AfterChange.Count; i++)
                style.AddProperty(__AfterChange[i].PropertyType, __AfterChange[i].Value);

            style.UpdateInspectorStyles();
        }
Example #9
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote row = document.FindOutlinerNoteById(__NodeId);
            if (document.HostNode != row)
                return;

            MainWindow window = DragDropHelper.GetMainWindow(treeListView);
            if (window != null)
                window.DoUnhoist(row);
        }
Example #10
0
        public static List<TreeListNode> FindNode(TreeListView view, Guid id)
        {
            var result = new List<TreeListNode>();

            foreach (var node in view.Nodes
                .Where(node => node.Content is TreeItemDto))
                result.AddRange(((TreeItemDto)node.Content).FindChildNode(node, id));

            return result;
        }
Example #11
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            var note = document.FindOutlinerNoteById(__NoteId);
            if (note == null)
                return;

            treeListView.MakeActive(note, -1, false);
            note.CreateInlineNote(DocumentHelpers.RestoreDocumentFromStream(__Document));
            note.InlineNoteDocument.Tag = __DocumentTag;
        }
Example #12
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);
            if (note == null)
                return;

            if (__Direction == IndentDirection.IncreaseIndent)
                DocumentHelpers.IncreaseIndent(note, treeListView, false);
            else
                DocumentHelpers.DecreaseIndent(note, treeListView, false);
        }
 public SledLuaWatchedCustomVariableRendererArgs(TreeListView control, TreeListView.Node node, Graphics gfx, Rectangle bounds, int column, ISledLuaVarBaseType luaVar, SledLuaWatchedCustomVariable customVar)
 {
     Control = control;
     Node = node;
     Graphics = gfx;
     Bounds = bounds;
     Column = column;
     LuaVariable = luaVar;
     CustomVariable = customVar;
     DrawDefault = true;
 }
Example #14
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote newParent = document.FindOutlinerNoteById(__ParentNoteId);

            OutlinerNote newNote = new OutlinerNote(newParent);
            newNote.Clone(__SavedNote);
            DocumentHelpers.CopyNodesRecursively(newNote, __SavedNote);

            newParent.SubNotes.Insert(__Index, newNote);

            treeListView.MakeActive(newNote, __ColumnIndexBeforeUndo, false);
        }
Example #15
0
 public CustomEdit(IntPtr handle, TreeListView treelistview, Control editor)
 {
     _treelistview = treelistview;
     _informations = _treelistview.EditedItem;
     if(editor == null) _editor = new TextBox();
     else _editor = editor;
     _editor.Hide();
     if(!_treelistview.Controls.Contains(_editor))
         _treelistview.Controls.Add(_editor);
     _editorhandle = new TreeListViewItemEditControlHandle(_treelistview, _editor, this);
     AssignHandle(handle);
 }
Example #16
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            var note = document.FindOutlinerNoteById(__NoteId);
            if (note == null)
                return;

            __Document = DocumentHelpers.SaveDocumentToStream(note.InlineNoteDocument);
            __DocumentTag = note.InlineNoteDocument.Tag;

            note.Document.FocusEditAfterTemplateChange = true;
            note.RemoveInlineNote();
        }
Example #17
0
        private void treeListViewButton_Click(object sender, EventArgs e)
        {
            foreach (IDisposable control in workPanel.Controls)
                control.Dispose();

            workPanel.Controls.Clear();

            var docBrowser = new TreeListView();
            docBrowser.TabIndex = 0;
            docBrowser.Dock = DockStyle.Fill;
            workPanel.Controls.Add(docBrowser);
        }
Example #18
0
        public static TreeListViewItem GetContainerForItem(TreeListView view, OutlinerNote note)
        {
            ItemContainerGenerator generator = view.ItemContainerGeneratorFor(note);
            if (generator == null)
                return null;

            TreeListViewItem container = generator.ContainerFromItem(note) as TreeListViewItem;
            if (container == null)
                return null;

            return container;
        }
Example #19
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);
            if (note == null)
                return;

            if (__Direction == IndentDirection.IncreaseIndent)
                DocumentHelpers.DecreaseIndent(note, treeListView, false);
            else
            {
                OutlinerNote limitNote = document.FindOutlinerNoteById(__LimitNoteId);
                DocumentHelpers.IncreaseIndentWithLimit(note, limitNote, __IsInlineEditFocused, treeListView, false);
            }
        }
Example #20
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);

            OutlinerNote newParent = document.FindOutlinerNoteById(__ParentNoteIdAfter);
            Debug.Assert(newParent != null);
            note.Parent.SubNotes.Remove(note);

            OutlinerNote newNote = new OutlinerNote(newParent);
            newNote.Clone(note);
            DocumentHelpers.CopyNodesRecursively(newNote, note);
            newParent.SubNotes.Insert(__IndexAfter, newNote);
            treeListView.MakeActive(newNote, -1, false);
        }
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);
            if (note == null)
                return;

            __After.Seek(0, SeekOrigin.Begin);

            FlowDocument flowDocument = (FlowDocument)note.Columns[__ColumnId].ColumnData;
            TextRange range = new TextRange(flowDocument.ContentStart, flowDocument.ContentEnd);
            range.Load(__After, DataFormats.Xaml);
            __FontPropertiesAfter.ApplyToFlowDocument(flowDocument);

            if (__WasSelected)
                treeListView.MakeActive(note, -1, false);
        }
Example #22
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            BaseStyle style = document.Styles.GetStyleByTag(__StyleTag);

            if (__AfterChange == null)
            {
                __AfterChange = new List<LevelStyleProperty>();
                for (int i = 0; i < style.Count; i++)
                    __AfterChange.Add(new LevelStyleProperty(style.Properties[i].PropertyType, style.Properties[i].Value));
            }

            style.Properties.Clear();
            for (int i = 0; i < __BeforeChange.Count; i++)
                style.AddProperty(__BeforeChange[i].PropertyType, __BeforeChange[i].Value);

            style.UpdateInspectorStyles();
        }
Example #23
0
        /* Buttons */
        private void ViewButton_Click(object sender, RoutedEventArgs e)
        {
            ListViewView listView     = FocusedTabControl.SelectedContent as ListViewView;
            TreeListView treeListView = FocusedTabControl.SelectedContent as TreeListView;

            if (listView != null)
            {
                var currentItem = (listView.MainListView.SelectedItem as ListItem);
                var path        = System.IO.Path.Combine(listView.PathManager.Path, currentItem.Name);
                MessageBox.Show(path + "\n" +
                                "Total space occupied:" + GetDirectorySize(path) + "bytes \n" +
                                currentItem.Date + "\n" +
                                currentItem.Size);
            }
            else if (treeListView != null)
            {
                MessageBox.Show(treeListView.Path + "\n" +
                                "Total space occupied:" + GetDirectorySize(treeListView.Path) + "bytes");
            }
        }
Example #24
0
        /// <summary>
        /// Retrieves the specified portion of the bounding rectangle for the item
        /// </summary>
        /// <param name="portion">One of the TreeListViewItemBoundsPortion values that represents a portion of the item for which to retrieve the bounding rectangle</param>
        /// <returns>A Rectangle that represents the bounding rectangle for the specified portion of the item</returns>
        public Rectangle GetBounds(TreeListViewItemBoundsPortion portion)
        {
            switch ((int)portion)
            {
            case (int)TreeListViewItemBoundsPortion.PlusMinus:
                if (TreeListView == null)
                {
                    throw(new Exception("This item is not associated with a TreeListView control"));
                }
                Point pos      = base.GetBounds(ItemBoundsPortion.Entire).Location;
                Point position = new Point(
                    Level * SystemInformation.SmallIconSize.Width + 1 + pos.X,
                    TreeListView.GetItemRect(Index, ItemBoundsPortion.Entire).Top + 1);
                return(new Rectangle(position, TreeListView.ShowPlusMinus ? SystemInformation.SmallIconSize : new Size(0, 0)));

            default:
                ItemBoundsPortion lviPortion = (ItemBoundsPortion)(int)portion;
                return(base.GetBounds(lviPortion));
            }
        }
Example #25
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            BaseStyle style = document.Styles.GetStyleByTag(__StyleTag);

            if (__AfterChange == null)
            {
                __AfterChange = new List <LevelStyleProperty>();
                for (int i = 0; i < style.Count; i++)
                {
                    __AfterChange.Add(new LevelStyleProperty(style.Properties[i].PropertyType, style.Properties[i].Value));
                }
            }

            style.Properties.Clear();
            for (int i = 0; i < __BeforeChange.Count; i++)
            {
                style.AddProperty(__BeforeChange[i].PropertyType, __BeforeChange[i].Value);
            }

            style.UpdateInspectorStyles();
        }
Example #26
0
        private void ListViewConfig(TreeListView olv)
        {
            olv.View               = View.Details;
            olv.FullRowSelect      = true;
            olv.GridLines          = true;
            olv.AllowColumnReorder = false;
            olv.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            olv.HideSelection         = false;
            olv.UseFiltering          = true;
            olv.HeaderStyle           = ColumnHeaderStyle.Clickable;
            olv.ShowItemToolTips      = true;
            olv.HeaderWordWrap        = true;
            olv.UseHotItem            = true;
            olv.UseTranslucentHotItem = true;
            olv.HeaderMaximumHeight   = 80;
            olv.HeaderMinimumHeight   = 50;
            HeaderFormatStyle HeaderStyle = new HeaderFormatStyle();

            HeaderStyle.SetFont(new Font(olv.Font.FontFamily, olv.Font.Size, FontStyle.Bold));
            olv.HeaderFormatStyle = HeaderStyle;
        }
        private static void ListView_ColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
        {
            TreeListView current = sender as TreeListView;

            Graphics  g = e.Graphics;
            Rectangle ColumnTitleBack = e.Bounds;

            ColumnTitleBack.Width  = current.Size.Width;
            ColumnTitleBack.Height = ColumnTitleBack.Height - 1;

            e.Graphics.FillRectangle(new SolidBrush(Neusoft.FrameWork.WinForms.Classes.Function.GetSysColor(Neusoft.FrameWork.WinForms.Classes.EnumSysColor.LightBlue)), ColumnTitleBack);

            Font         font = e.Font;
            StringFormat sf   = new StringFormat();

            sf.Alignment     = StringAlignment.Near;
            sf.LineAlignment = StringAlignment.Far;
            Color fontcolor = System.Drawing.Color.Black;

            g.DrawString(e.Header.Text, font, new SolidBrush(fontcolor), e.Bounds, sf);
        }
Example #28
0
 private void GetData(TreeListView olv)
 {
     try
     {
         pbrProgress.Visible = true;
         olv.BeginUpdate();
         olv.Items.Clear();
         olv.CanExpandGetter = delegate(object SB) { return(((StaffBranch)SB).Children.Count > 0); };
         olv.ChildrenGetter  = delegate(object SB) { return(((StaffBranch)SB).Children); };
         olv.Roots           = GetAnalysisTree();
         olv.Expand(olv.TreeModel.GetNthObject(0));
         olv.EndUpdate();
         lblRecord.Text      = "0 z " + olv.Items.Count;
         olv.Enabled         = olv.Items.Count > 0 ? true : false;
         pbrProgress.Visible = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #29
0
        private void CSSTLVI(TreeListView TLV, bool expand = false)
        {
            mainTV.doSort = true;
            toolStripProgressBar1.Value = 0;
            outputtree.doSort           = true;

            TLV.Sort();
            if (expand)
            {
                Controller.ExpandTLVI(TLV);
            }
            else
            {
                Controller.CollapseTLVI(TLV);
            }

            Controller.SetImages(TLV, showicon.Checked, ref imageList1);
            TLV.Show();
            menuStrip1.Enabled = true;
            TC.Enabled         = true;
        }
Example #30
0
 public void render(Dictionary <String, DebuggableRef> debuggables, TreeListView view)
 {
     if (RENDER_DEBUGGING)
     {
         foreach (var pair in debuggables)
         {
             var          name   = pair.Key;
             var          root   = pair.Value;
             TreeViewItem node   = null;
             bool         exists = false;
             for (int i = 0; i < view.Items.Count; i++)
             {
                 TreeViewItem t = (TreeViewItem)view.Items[i];
                 if (((DebugItem)t.Header).name == name)
                 {
                     node   = t;
                     exists = true;
                 }
             }
             node = dfs(name, root, node);
             if (!exists)
             {
                 view.Items.Add(node);
             }
         }
         List <TreeViewItem> toRemove = new List <TreeViewItem>();
         for (int i = 0; i < view.Items.Count; i++)
         {
             TreeViewItem t = (TreeViewItem)view.Items[i];
             if (!debuggables.ContainsKey(((DebugItem)t.Header).name))
             {
                 toRemove.Add(t);
             }
         }
         foreach (var item in toRemove)
         {
             view.Items.Remove(item);
         }
     }
 }
        private void canDrop(ModelDropEventArgs e, TreeListView treeListView)
        {
            var targetNode = e.TargetModel as MP.MappingNode;
            var sourceNode = e.SourceModels.Cast <MP.MappingNode>().FirstOrDefault();
            var topNode    = treeListView.Objects.Cast <MP.MappingNode>().FirstOrDefault();

            //
            if (targetNode != null && sourceNode != null
                //do not allow mapping to self
                && targetNode != sourceNode
                //make sure the nodes are not empty
                && targetNode.source != null && sourceNode.source != null
                //do not allow to drop on same treeView
                && sourceNode != topNode &&
                !sourceNode.isChildOf(topNode))
            {
                if (sourceNode.isReadOnly)
                {
                    e.Effect      = DragDropEffects.None;
                    e.InfoMessage = "Source item is read-only!";
                }
                //make sure that they are not already mapped
                else if (sourceNode.mappings.Any(x => x.target == targetNode && x.source == sourceNode ||
                                                 x.target == sourceNode && x.source == targetNode))
                {
                    e.Effect      = DragDropEffects.None;
                    e.InfoMessage = "Items are already mapped!";
                }
                else
                {
                    //OK we can create the mapping
                    e.Effect      = DragDropEffects.Link;
                    e.InfoMessage = "Create new Mapping";
                }
            }
            else
            {
                e.Effect = DragDropEffects.None;
            }
        }
Example #32
0
        public FlagUpdateManager(ConcurrentQueue <object> source, TreeListView myTreeView)
        {
            stack    = new BlockingCollection <object>(source);
            treeView = myTreeView;
            Form1 frm = (Form1)treeView.Parent.Parent.Parent;

            consumer = Task.Run(() =>
            {
                List <object> accumulator = new List <object>();
                foreach (object myObj in stack.GetConsumingEnumerable())
                {
                    accumulator.Add(myObj);
                    if (stack.Count == 0)
                    {
                        treeView.Invalidate();
                        accumulator.Clear();
                        Thread.Sleep(200);
                        // fist run ok, but now wait a little to build the queue for the next run
                    }
                }
            });
        }
Example #33
0
 //
 public static TreeListViewItem getItemByText(TreeListView TLV, String name, bool recursive = false)
 {
     foreach (TreeListViewItem T in TLV.Items)
     {
         if (T.Text.Equals(name))
         {
             return(T);
         }
         if (recursive)
         {
             if (T.Items.Count > 0)
             {
                 TreeListViewItem xex = getItemByText(T, name);
                 if (xex != null)
                 {
                     return(xex);
                 }
             }
         }
     }
     return(null);
 }
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);

            if (note == null)
            {
                return;
            }

            __After.Seek(0, SeekOrigin.Begin);

            FlowDocument flowDocument = (FlowDocument)note.Columns[__ColumnId].ColumnData;
            TextRange    range        = new TextRange(flowDocument.ContentStart, flowDocument.ContentEnd);

            range.Load(__After, DataFormats.Xaml);
            __FontPropertiesAfter.ApplyToFlowDocument(flowDocument);

            if (__WasSelected)
            {
                treeListView.MakeActive(note, -1, false);
            }
        }
Example #35
0
        private void TreeListView_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Delete || e.Key == Key.Back)
            {
                TreeListView view = (TreeListView)sender;

                //data context of the view is multibinding to two objects - the first one is the packageBuilder,
                //the second one is that currentState (so that when it changes the view gets notification)
                List <object> values = view.DataContext as List <object>;
                if (values != null)
                {
                    PackageBuilderViewModel viewModel = (PackageBuilderViewModel)values[0];
                    PackageSourceInfo       source    = viewModel.PackageSourceInfo;
                    PackageFileSourceInfo   info      = view.SelectedItem as PackageFileSourceInfo;
                    if (info != source.Root && info != null)
                    {
                        info.Parent.Children.Remove(info);
                        view.Focus();
                    }
                }
            }
        }
Example #36
0
        public static void ClearAndRecalculate(bool recursive, TreeListView outputtree, TreeListView mainTV)
        {
            if (outputtree.SelectedItems.Count > 0)
            {
                //first clear all sizes for selected items
                foreach (TreeListViewItem TLVI in outputtree.SelectedItems)
                {
                    treelistviewfuncs.clearSizes(treelistviewfuncs.getItemByName(mainTV, TLVI.Name), false);
                }

                //then repopulate
                foreach (TreeListViewItem TLVI in outputtree.SelectedItems)
                {
                    treelistviewfuncs.recalculateSizes(treelistviewfuncs.getItemByName(mainTV, TLVI.Name));
                }
            }
            else
            {
                treelistviewfuncs.clearSizes(ref mainTV);
                treelistviewfuncs.recalculateSizes(mainTV);
            }
        }
Example #37
0
        public void ApplyToTree(IActivateItems activator,TreeListView tree, IMapsDirectlyToDatabaseTable objectToEmphasise, DescendancyList descendancy)
        {
            _activator = activator;

            if (_tree != null)
                throw new Exception("Scope filter is already applied to a tree");

            _toPin = null;

            if (IsPinnableType(objectToEmphasise))
                _toPin = objectToEmphasise;
            else if (descendancy != null)
                _toPin = descendancy.Parents.FirstOrDefault(IsPinnableType);

            if (_toPin == null)
                return;
            
            _tree = tree;

            lblFilter.Text = _toPin.ToString();
            
            //add the filter to the tree
            Dock = DockStyle.Top;

            if (_tree.Dock != DockStyle.Fill)
            {
               //tree is not docked, make some room for us
                _tree.Height -= 19;
                _tree.Top += 19;
            }

            _tree.Parent.Controls.Add(this);

            _beforeModelFilter = _tree.ModelFilter;
            _beforeUseFiltering = _tree.UseFiltering;

            RefreshWhiteList(_activator.CoreChildProvider,descendancy);
        }
Example #38
0
        public void CreateColums(TreeListView listview)
        {
            //  listView1.HeaderStyle=
            listview.Columns.Add(new OLVColumn()
            {
                AspectName = "ID", Text = "标题id", TextAlign = HorizontalAlignment.Center
            });
            listview.Columns.Add(new OLVColumn()
            {
                AspectName = "Name", Text = "标题Name", TextAlign = HorizontalAlignment.Center
            });
            listview.Columns.Add(new OLVColumn()
            {
                AspectName = "Name", Text = "标题", TextAlign = HorizontalAlignment.Center
            });

            //listview.Columns.Add( "序号", 90, HorizontalAlignment.Center);
            //listview.Columns.Add("单位", 320, HorizontalAlignment.Left);
            //listview.Columns.Add("姓名", 130, HorizontalAlignment.Left);
            //listview.Columns.Add("职务", 150, HorizontalAlignment.Left);
            //listview.Columns.Add("办公红机", 120, HorizontalAlignment.Right);
            //listview.Columns.Add("住宿红机", 120, HorizontalAlignment.Right);
            //listview.Columns.Add("秘书红机", 120, HorizontalAlignment.Right);
            //listview.Columns.Add("办公普机", 185, HorizontalAlignment.Right);
            //listview.Columns.Add("住宿普机", 225, HorizontalAlignment.Right);
            //listview.Columns.Add("手机", 215, HorizontalAlignment.Right);
            //listview.Columns.Add("传真", 225, HorizontalAlignment.Right);
            //listview.Columns.Add("秘书", 160, HorizontalAlignment.Left);
            //listview.Columns.Add("秘书普机", 160, HorizontalAlignment.Right);
            //listview.Columns.Add("秘书手机", 165, HorizontalAlignment.Right);
            //listview.Columns.Add("秘书传真", 225, HorizontalAlignment.Right);
            //listview.Columns.Add("办公地址", 375, HorizontalAlignment.Left);
            //listview.Columns.Add("住宿地址", 400, HorizontalAlignment.Left);
            //listview.Columns.Add("秘书办公地址", 375, HorizontalAlignment.Left);
            //listview.Columns.Add("秘书住宿地址", 400, HorizontalAlignment.Left);
            //listview.Columns.Add("备注1", 380, HorizontalAlignment.Left);
            //listview.Columns.Add("备注2", 380, HorizontalAlignment.Left);
        }
Example #39
0
        private void addFolderToTreeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var FBD = new FolderBrowserDialog();
            //FBD.RootFolder = Environment.SpecialFolder.

            DialogResult DR = FBD.ShowDialog();

            if (DR != DialogResult.OK)
            {
                return;
            }

            //get information
            TreeListView TLV = treelistviewfuncs.getDirectoryTree(FBD.SelectedPath, null, 0, 5, true);

            //specific location

            outputtree.Hide();

            if (outputtree.SelectedItems.Count == 1)
            {
                treelistviewfuncs.CopyNodes(TLV, treelistviewfuncs.getItemByName(mainTV, outputtree.SelectedItems[0].Name), false, 0);
            }
            else
            {
                treelistviewfuncs.CopyNodes(TLV, mainTV, false, 0);
            }

            treelistviewfuncs.recalculateSizes(mainTV);

            treelistviewfuncs.CopyNodes(mainTV, outputtree, true, 0);
            CSSTLVI(outputtree);

            if (autosave.Checked)
            {
                serialisation.SerializeTreeListView(mainTV, mainTVFilePath);
            }
        }
Example #40
0
 /// <summary>
 /// Ensure that the node is visible (expand parents and scroll listview so that the item is visible)
 /// </summary>
 new public void EnsureVisible()
 {
     if (!Visible)
     {
         if (IsInATreeListView)
         {
             TreeListView.BeginUpdate();
         }
         if (ListView != null)
         {
             ListView.Invoke(new MethodInvoker(ExpandParents));
         }
         else
         {
             ExpandParents();
         }
         if (TreeListView != null)
         {
             TreeListView.EndUpdate();
         }
     }
     base.EnsureVisible();
 }
Example #41
0
        private void CreateColorIndicator(TreeListView tree, RDMPCollection collection)
        {
            var indicatorHeight = BackColorProvider.IndiciatorBarSuggestedHeight;

            BackColorProvider p = new BackColorProvider();
            var ctrl            = new Control();

            ctrl.BackColor = p.GetColor(collection);
            ctrl.Location  = new Point(Tree.Location.X, tree.Location.Y - indicatorHeight);
            ctrl.Height    = indicatorHeight;
            ctrl.Width     = Tree.Width;

            if (Tree.Dock != DockStyle.None)
            {
                ctrl.Dock = DockStyle.Top;
            }
            else
            {
                ctrl.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
            }

            Tree.Parent.Controls.Add(ctrl);
        }
Example #42
0
        public override void Undo(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteById(__NoteId);

            if (note == null)
            {
                return;
            }

            for (int i = 0; i < note.Columns.Count; i++)
            {
                FlowDocument flowDocument = note.Columns[i].ColumnData as FlowDocument;
                if (flowDocument == null)
                {
                    continue;
                }

                __Before[i].Seek(0, SeekOrigin.Begin);

                TextRange range = new TextRange(flowDocument.ContentStart, flowDocument.ContentEnd);
                range.Load(__Before[i], DataFormats.Xaml);
            }
        }
Example #43
0
        public static bool Rem(ref TreeListView T, String FullPath)
        {
            for (int a = 0; a < T.Items.Count; a++)
            {
                if (T.Items[a].fullPath.Equals(FullPath))
                {
                    T.Items.RemoveAt(a);
                    return(true);
                }

                if (T.Items.Count > 0)
                {
                    var newT = new TreeListViewItem();
                    treelistviewfuncs.CopyNode(T.Items[a], ref newT);
                    if (Rem(ref newT, FullPath))
                    {
                        T.Items.RemoveAt(a);
                        T.Items.Add(newT);
                    }
                }
            }
            return(false);
        }
Example #44
0
        public void InitDrives(TreeListView treeListView)
        {
            try
            {
                var root = Helper.GetLogicalDrives();

                foreach (var s in root)
                {
                    var node = new TreeListNode()
                    {
                        Content = new FileSystemItem(s, "Drive", "<Drive>", s),
                        Image   = FileSystemImages.DiskImage,
                        IsExpandButtonVisible = DefaultBoolean.True,
                        Tag = false
                    };
                    treeListView.Nodes.Add(node);
                }
            }
            catch (Exception)
            {
                //MessageBox.Show(e.Message);
            }
        }
Example #45
0
        /// <summary>
        /// Generate CanExpand and ChildrenGetter delegates from the given property.
        /// </summary>
        /// <param name="tlv"></param>
        /// <param name="pinfo"></param>
        protected virtual void GenerateChildrenDelegates(TreeListView tlv, PropertyInfo pinfo)
        {
            Munger childrenGetter = new Munger(pinfo.Name);

            tlv.CanExpandGetter = delegate(object x) {
                try {
                    IEnumerable result = childrenGetter.GetValueEx(x) as IEnumerable;
                    return(!AdvancedListView.IsEnumerableEmpty(result));
                }
                catch (MungerException ex) {
                    System.Diagnostics.Debug.WriteLine(ex);
                    return(false);
                }
            };
            tlv.ChildrenGetter = delegate(object x) {
                try {
                    return(childrenGetter.GetValueEx(x) as IEnumerable);
                }
                catch (MungerException ex) {
                    System.Diagnostics.Debug.WriteLine(ex);
                    return(null);
                }
            };
        }
Example #46
0
        // From http://sourceforge.net/p/objectlistview/discussion/812922/thread/d2a643c1/?limit=25
        private static void AutoSizeColumns(TreeListView treeList, int depth, bool recalculate)
        {
            int totalWidth = 0;

            foreach (ColumnHeader col in treeList.Columns)
            {
                if (recalculate)
                {
                    col.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
                    col.Width += 16;
                    if (col.Index == 0)
                    {
                        // We have to manually take care of tree structure, checkbox and image
                        col.Width += 16 * depth;
                    }
                }
                if (col.Index == treeList.Columns.Count - 1)
                {
                    // Fill in the rest
                    col.Width = treeList.ClientSize.Width - totalWidth;
                }
                totalWidth += col.Width;
            }
        }
Example #47
0
 private void GenerateColumns(TreeListView olv, List <OLVColumn> Cols)
 {
     olv.AllColumns.Clear();
     olv.AllColumns.AddRange(Cols);
     olv.RebuildColumns();
 }
Example #48
0
        /// <summary>
        /// M�thode requise pour la prise en charge du concepteur - ne modifiez pas
        /// le contenu de cette m�thode avec l'�diteur de code.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChartOfAccountsForm));
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.tlvAccounts = new BrightIdeasSoftware.TreeListView();
            this.olvColumnInternalAccountID = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
            this.olvColumnLabel = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
            this.olvColumnExportedBalance = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
            this.groupBoxActions = new System.Windows.Forms.GroupBox();
            this.btnExportAccounts = new System.Windows.Forms.Button();
            this.btnImportAccounts = new System.Windows.Forms.Button();
            this.btnDeleteAccount = new System.Windows.Forms.Button();
            this.btnEditAccount = new System.Windows.Forms.Button();
            this.btnAddAccount = new System.Windows.Forms.Button();
            this.btnExport = new System.Windows.Forms.Button();
            this.panel1 = new System.Windows.Forms.Panel();
            this.btnClose = new System.Windows.Forms.Button();
            this._labelTitle = new System.Windows.Forms.Label();
            this._tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.fileDialog = new System.Windows.Forms.OpenFileDialog();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tlvAccounts)).BeginInit();
            this.groupBoxActions.SuspendLayout();
            this.panel1.SuspendLayout();
            this._tableLayoutPanel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // splitContainer1
            // 
            resources.ApplyResources(this.splitContainer1, "splitContainer1");
            this.splitContainer1.Name = "splitContainer1";
            // 
            // splitContainer1.Panel1
            // 
            this.splitContainer1.Panel1.Controls.Add(this.tlvAccounts);
            // 
            // splitContainer1.Panel2
            // 
            this.splitContainer1.Panel2.Controls.Add(this.groupBoxActions);
            // 
            // tlvAccounts
            // 
            this.tlvAccounts.AllColumns.Add(this.olvColumnInternalAccountID);
            this.tlvAccounts.AllColumns.Add(this.olvColumnLabel);
            this.tlvAccounts.AllColumns.Add(this.olvColumnExportedBalance);
            this.tlvAccounts.CheckBoxes = false;
            this.tlvAccounts.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.olvColumnInternalAccountID,
            this.olvColumnLabel});
            resources.ApplyResources(this.tlvAccounts, "tlvAccounts");
            this.tlvAccounts.FullRowSelect = true;
            this.tlvAccounts.HideSelection = false;
            this.tlvAccounts.MultiSelect = false;
            this.tlvAccounts.Name = "tlvAccounts";
            this.tlvAccounts.OwnerDraw = true;
            this.tlvAccounts.ShowGroups = false;
            this.tlvAccounts.UseCompatibleStateImageBehavior = false;
            this.tlvAccounts.View = System.Windows.Forms.View.Details;
            this.tlvAccounts.VirtualMode = true;
            // 
            // olvColumnInternalAccountID
            // 
            this.olvColumnInternalAccountID.AspectName = "Number";
            this.olvColumnInternalAccountID.IsEditable = false;
            resources.ApplyResources(this.olvColumnInternalAccountID, "olvColumnInternalAccountID");
            // 
            // olvColumnLabel
            // 
            this.olvColumnLabel.AspectName = "Label";
            resources.ApplyResources(this.olvColumnLabel, "olvColumnLabel");
            // 
            // olvColumnExportedBalance
            // 
            this.olvColumnExportedBalance.AspectName = "Id";
            resources.ApplyResources(this.olvColumnExportedBalance, "olvColumnExportedBalance");
            this.olvColumnExportedBalance.IsVisible = false;
            // 
            // groupBoxActions
            // 
            this.groupBoxActions.Controls.Add(this.btnExportAccounts);
            this.groupBoxActions.Controls.Add(this.btnImportAccounts);
            this.groupBoxActions.Controls.Add(this.btnDeleteAccount);
            this.groupBoxActions.Controls.Add(this.btnEditAccount);
            this.groupBoxActions.Controls.Add(this.btnAddAccount);
            this.groupBoxActions.Controls.Add(this.btnExport);
            resources.ApplyResources(this.groupBoxActions, "groupBoxActions");
            this.groupBoxActions.Name = "groupBoxActions";
            this.groupBoxActions.TabStop = false;
            // 
            // btnExportAccounts
            // 
            resources.ApplyResources(this.btnExportAccounts, "btnExportAccounts");
            this.btnExportAccounts.Name = "btnExportAccounts";
            this.btnExportAccounts.Click += new System.EventHandler(this.BtnExportAccountsClick);
            // 
            // btnImportAccounts
            // 
            resources.ApplyResources(this.btnImportAccounts, "btnImportAccounts");
            this.btnImportAccounts.Name = "btnImportAccounts";
            this.btnImportAccounts.Click += new System.EventHandler(this.BtnLoadClick);
            // 
            // btnDeleteAccount
            // 
            resources.ApplyResources(this.btnDeleteAccount, "btnDeleteAccount");
            this.btnDeleteAccount.Name = "btnDeleteAccount";
            this.btnDeleteAccount.Click += new System.EventHandler(this.buttonDeleteRule_Click);
            // 
            // btnEditAccount
            // 
            resources.ApplyResources(this.btnEditAccount, "btnEditAccount");
            this.btnEditAccount.Name = "btnEditAccount";
            this.btnEditAccount.Click += new System.EventHandler(this.buttonEditRule_Click);
            // 
            // btnAddAccount
            // 
            resources.ApplyResources(this.btnAddAccount, "btnAddAccount");
            this.btnAddAccount.Name = "btnAddAccount";
            this.btnAddAccount.Click += new System.EventHandler(this.buttonAddAccount_Click);
            // 
            // btnExport
            // 
            resources.ApplyResources(this.btnExport, "btnExport");
            this.btnExport.Name = "btnExport";
            this.btnExport.Click += new System.EventHandler(this.butExport_Click);
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.btnClose);
            this.panel1.Controls.Add(this._labelTitle);
            resources.ApplyResources(this.panel1, "panel1");
            this.panel1.Name = "panel1";
            // 
            // btnClose
            // 
            resources.ApplyResources(this.btnClose, "btnClose");
            this.btnClose.Name = "btnClose";
            this.btnClose.Click += new System.EventHandler(this.buttonExit_Click);
            // 
            // _labelTitle
            // 
            this._labelTitle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(81)))), ((int)(((byte)(152)))));
            resources.ApplyResources(this._labelTitle, "_labelTitle");
            this._labelTitle.ForeColor = System.Drawing.Color.White;
            this._labelTitle.Name = "_labelTitle";
            // 
            // _tableLayoutPanel1
            // 
            resources.ApplyResources(this._tableLayoutPanel1, "_tableLayoutPanel1");
            this._tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
            this._tableLayoutPanel1.Controls.Add(this.splitContainer1, 0, 1);
            this._tableLayoutPanel1.Name = "_tableLayoutPanel1";
            // 
            // fileDialog
            // 
            this.fileDialog.DefaultExt = "*.CSV";
            // 
            // ChartOfAccountsForm
            // 
            resources.ApplyResources(this, "$this");
            this.Controls.Add(this._tableLayoutPanel1);
            this.Name = "ChartOfAccountsForm";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
            this.splitContainer1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.tlvAccounts)).EndInit();
            this.groupBoxActions.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this._tableLayoutPanel1.ResumeLayout(false);
            this.ResumeLayout(false);

		}
Example #49
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     PTM.View.Controls.TreeListViewComponents.TreeListViewItemCollection.TreeListViewItemCollectionComparer treeListViewItemCollectionComparer1 = new PTM.View.Controls.TreeListViewComponents.TreeListViewItemCollection.TreeListViewItemCollectionComparer();
     this.applicationsList    = new PTM.View.Controls.TreeListViewComponents.TreeListView();
     this.colName             = new System.Windows.Forms.ColumnHeader();
     this.colActiveTime       = new System.Windows.Forms.ColumnHeader();
     this.colAppPercent       = new System.Windows.Forms.ColumnHeader();
     this.groupBox3           = new System.Windows.Forms.GroupBox();
     this.groupBox4           = new System.Windows.Forms.GroupBox();
     this.AppsActiveTimeValue = new System.Windows.Forms.Label();
     this.label8             = new System.Windows.Forms.Label();
     this.browseButton       = new System.Windows.Forms.Button();
     this.parentTaskComboBox = new System.Windows.Forms.ComboBox();
     this.label2             = new System.Windows.Forms.Label();
     this.toDateTimePicker   = new System.Windows.Forms.DateTimePicker();
     this.toRadioButton      = new System.Windows.Forms.RadioButton();
     this.fromRadioButton    = new System.Windows.Forms.RadioButton();
     this.fromDateTimePicker = new System.Windows.Forms.DateTimePicker();
     this.searchButton       = new System.Windows.Forms.Button();
     this.groupBox3.SuspendLayout();
     this.groupBox4.SuspendLayout();
     this.SuspendLayout();
     //
     // applicationsList
     //
     this.applicationsList.AllowColumnReorder = true;
     this.applicationsList.Anchor             = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                                       | System.Windows.Forms.AnchorStyles.Left)
                                                                                      | System.Windows.Forms.AnchorStyles.Right)));
     this.applicationsList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
         this.colName,
         this.colActiveTime,
         this.colAppPercent
     });
     treeListViewItemCollectionComparer1.Column    = 0;
     treeListViewItemCollectionComparer1.SortOrder = System.Windows.Forms.SortOrder.Ascending;
     this.applicationsList.Comparer    = treeListViewItemCollectionComparer1;
     this.applicationsList.Location    = new System.Drawing.Point(8, 16);
     this.applicationsList.MultiSelect = false;
     this.applicationsList.Name        = "applicationsList";
     this.applicationsList.Size        = new System.Drawing.Size(376, 136);
     this.applicationsList.TabIndex    = 0;
     this.applicationsList.UseCompatibleStateImageBehavior = false;
     //
     // colName
     //
     this.colName.Text  = "Name";
     this.colName.Width = 233;
     //
     // colActiveTime
     //
     this.colActiveTime.Text      = "Active Time";
     this.colActiveTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
     this.colActiveTime.Width     = 78;
     //
     // colAppPercent
     //
     this.colAppPercent.Text      = "Percent";
     this.colAppPercent.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
     //
     // groupBox3
     //
     this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox3.Controls.Add(this.applicationsList);
     this.groupBox3.ForeColor = System.Drawing.Color.Blue;
     this.groupBox3.Location  = new System.Drawing.Point(8, 64);
     this.groupBox3.Name      = "groupBox3";
     this.groupBox3.Size      = new System.Drawing.Size(392, 160);
     this.groupBox3.TabIndex  = 3;
     this.groupBox3.TabStop   = false;
     this.groupBox3.Text      = "Applications";
     //
     // groupBox4
     //
     this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox4.Controls.Add(this.AppsActiveTimeValue);
     this.groupBox4.Controls.Add(this.label8);
     this.groupBox4.ForeColor = System.Drawing.Color.Blue;
     this.groupBox4.Location  = new System.Drawing.Point(8, 232);
     this.groupBox4.Name      = "groupBox4";
     this.groupBox4.Size      = new System.Drawing.Size(392, 48);
     this.groupBox4.TabIndex  = 4;
     this.groupBox4.TabStop   = false;
     this.groupBox4.Text      = "Totals";
     //
     // AppsActiveTimeValue
     //
     this.AppsActiveTimeValue.ForeColor = System.Drawing.Color.Black;
     this.AppsActiveTimeValue.Location  = new System.Drawing.Point(112, 16);
     this.AppsActiveTimeValue.Name      = "AppsActiveTimeValue";
     this.AppsActiveTimeValue.Size      = new System.Drawing.Size(80, 23);
     this.AppsActiveTimeValue.TabIndex  = 1;
     //
     // label8
     //
     this.label8.ForeColor = System.Drawing.Color.Black;
     this.label8.Location  = new System.Drawing.Point(8, 16);
     this.label8.Name      = "label8";
     this.label8.Size      = new System.Drawing.Size(104, 23);
     this.label8.TabIndex  = 0;
     this.label8.Text      = "Apps. Active Time:";
     //
     // browseButton
     //
     this.browseButton.Location = new System.Drawing.Point(320, 4);
     this.browseButton.Name     = "browseButton";
     this.browseButton.Size     = new System.Drawing.Size(75, 23);
     this.browseButton.TabIndex = 2;
     this.browseButton.Text     = "Browse...";
     this.browseButton.Click   += new System.EventHandler(this.browseButton_Click);
     //
     // parentTaskComboBox
     //
     this.parentTaskComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.parentTaskComboBox.Location      = new System.Drawing.Point(80, 5);
     this.parentTaskComboBox.MaxLength     = 50;
     this.parentTaskComboBox.Name          = "parentTaskComboBox";
     this.parentTaskComboBox.Size          = new System.Drawing.Size(232, 21);
     this.parentTaskComboBox.TabIndex      = 1;
     //
     // label2
     //
     this.label2.Location  = new System.Drawing.Point(8, 4);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(72, 23);
     this.label2.TabIndex  = 6;
     this.label2.Text      = "Detail Level:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // toDateTimePicker
     //
     this.toDateTimePicker.CustomFormat = "";
     this.toDateTimePicker.Enabled      = false;
     this.toDateTimePicker.Format       = System.Windows.Forms.DateTimePickerFormat.Short;
     this.toDateTimePicker.Location     = new System.Drawing.Point(224, 32);
     this.toDateTimePicker.Name         = "toDateTimePicker";
     this.toDateTimePicker.Size         = new System.Drawing.Size(88, 20);
     this.toDateTimePicker.TabIndex     = 21;
     this.toDateTimePicker.Value        = new System.DateTime(2006, 10, 2, 0, 0, 0, 0);
     //
     // toRadioButton
     //
     this.toRadioButton.Location        = new System.Drawing.Point(186, 32);
     this.toRadioButton.Name            = "toRadioButton";
     this.toRadioButton.Size            = new System.Drawing.Size(44, 24);
     this.toRadioButton.TabIndex        = 20;
     this.toRadioButton.Text            = "To:";
     this.toRadioButton.CheckedChanged += new System.EventHandler(this.toRadioButton_CheckedChanged);
     //
     // fromRadioButton
     //
     this.fromRadioButton.Checked         = true;
     this.fromRadioButton.Location        = new System.Drawing.Point(28, 32);
     this.fromRadioButton.Name            = "fromRadioButton";
     this.fromRadioButton.Size            = new System.Drawing.Size(54, 24);
     this.fromRadioButton.TabIndex        = 19;
     this.fromRadioButton.TabStop         = true;
     this.fromRadioButton.Text            = "Date:";
     this.fromRadioButton.CheckedChanged += new System.EventHandler(this.fromRadioButton_CheckedChanged);
     //
     // fromDateTimePicker
     //
     this.fromDateTimePicker.CustomFormat = "";
     this.fromDateTimePicker.Format       = System.Windows.Forms.DateTimePickerFormat.Short;
     this.fromDateTimePicker.Location     = new System.Drawing.Point(80, 32);
     this.fromDateTimePicker.Name         = "fromDateTimePicker";
     this.fromDateTimePicker.Size         = new System.Drawing.Size(88, 20);
     this.fromDateTimePicker.TabIndex     = 18;
     this.fromDateTimePicker.Value        = new System.DateTime(2006, 10, 2, 0, 0, 0, 0);
     //
     // searchButton
     //
     this.searchButton.Location = new System.Drawing.Point(320, 32);
     this.searchButton.Name     = "searchButton";
     this.searchButton.Size     = new System.Drawing.Size(75, 23);
     this.searchButton.TabIndex = 22;
     this.searchButton.Text     = "Search";
     this.searchButton.Click   += new System.EventHandler(this.searchButton_Click);
     //
     // StatisticsControl
     //
     this.Controls.Add(this.toDateTimePicker);
     this.Controls.Add(this.fromDateTimePicker);
     this.Controls.Add(this.searchButton);
     this.Controls.Add(this.browseButton);
     this.Controls.Add(this.parentTaskComboBox);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.groupBox4);
     this.Controls.Add(this.groupBox3);
     this.Controls.Add(this.toRadioButton);
     this.Controls.Add(this.fromRadioButton);
     this.Name  = "StatisticsControl";
     this.Size  = new System.Drawing.Size(408, 288);
     this.Load += new System.EventHandler(this.Statistics_Load);
     this.groupBox3.ResumeLayout(false);
     this.groupBox4.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Example #50
0
        private MyEdit GetEdit(OutlinerDocument document, TreeListView treeListView)
        {
            OutlinerNote note = document.FindOutlinerNoteByDocument(__DocumentGuid);
            Debug.Assert(note != null, "GetEdit's note == null");

            TreeListViewItem item = ViewHelpers.GetContainerForItem(treeListView, note);
            Debug.Assert(item != null, "Bad news: UndoMyAction's Undo has item == null");

            MainWindow mw = DragDropHelper.GetMainWindow(treeListView);

            MyEdit edit = item.GetEditor(mw.GetViewColumnId(__ColumnId), __ColumnId, __IsInlineNote);
            return edit;
        }
Example #51
0
        public override void Redo(OutlinerDocument document, TreeListView treeListView)
        {
            MyEdit edit = GetEdit(document, treeListView);
            Debug.Assert(edit != null, "Bad news: UndoMyAction's Undo has edit == null");

            __UndoAction.Redo(edit);
            edit.Links_Update();
            Keyboard.Focus(edit);
        }
 public RowSetting(TreeListView owner)
 {
     m_owner = owner;
 }
Example #53
0
 public RDMPContextMenuStripArgs(IActivateItems itemActivator, TreeListView tree, object model) : this(itemActivator)
 {
     Tree  = tree;
     Model = model;
 }
Example #54
0
 public CellPainter(TreeListView owner)
 {
     m_owner = owner;
 }
 public CollumnSetting(TreeListView owner)
 {
     m_owner = owner;
 }
Example #56
0
 public ColumnHeaderPainter(TreeListView owner)
 {
     m_owner = owner;
 }
 public MySorter(TreeListView control)
 {
     m_control = control;
 }
Example #58
0
        public static void IncreaseIndentWithLimit(OutlinerNote row, OutlinerNote limit, bool isInlineNoteFocused, TreeListView outlinerTree, bool applyStyle)
        {
            if (!CanIncreaseIndent(row))
                return;

            int activeColumn = DocumentHelpers.GetFocusedColumnIdx(outlinerTree, row);

            ObservableCollection<OutlinerNote> parentCollection = row.Document.GetParentCollection(row);
            int idx = GetNoteIndexAtParent(row);
            parentCollection.Remove(row);

            OutlinerNote newNote = new OutlinerNote(parentCollection[idx - 1]);
            newNote.Clone(row);

            int insertIntoIdx = parentCollection[idx - 1].SubNotes.Count;
            if (limit == row)
                DocumentHelpers.CopyNodesRecursively(parentCollection[idx - 1], row);
            else
                DocumentHelpers.CopyNodesRecursively(newNote, parentCollection[idx - 1], row, limit);

            parentCollection[idx - 1].SubNotes.Insert(insertIntoIdx, newNote);
            parentCollection[idx - 1].IsExpanded = true;

            row.Parent.UpdateParentCheckboxes();
            newNote.UpdateParentCheckboxes();
            if (applyStyle)
                outlinerTree.MakeActive(newNote, activeColumn, isInlineNoteFocused, new EventHandler(ApplyStyleAfterMakeActive));
            else
                outlinerTree.MakeActive(newNote, activeColumn, isInlineNoteFocused);
        }
Example #59
0
        public static void MoveNodeUp(OutlinerNote selectedItem, TreeListView outlinerTree, int activeColumn, bool isInlineNoteActive)
        {
            int selectedIndex = selectedItem.Parent.SubNotes.IndexOf(selectedItem);
            if (selectedIndex == 0)
                return;

            OutlinerNote newNote = new OutlinerNote(selectedItem.Parent);
            newNote.Clone(selectedItem);
            CopyNodesRecursively(newNote, selectedItem);

            selectedItem.Parent.SubNotes.Remove(selectedItem);
            selectedItem.Parent.SubNotes.Insert(selectedIndex - 1, newNote);

            outlinerTree.MakeActive(newNote, activeColumn, isInlineNoteActive);
        }
Example #60
0
 public static bool IsInlineNoteFocused(TreeListView outlinerTree)
 {
     MainWindow mainWindow = DragDropHelper.GetMainWindow(outlinerTree);
     return mainWindow.IsInlineNoteFocused;
 }