예제 #1
0
        public static void Remove(UC_DocItem docItem)
        {
            var window = (MainWindow)Window.GetWindow(docItem);

            window.Root.MouseLeftButtonUp -= docItem.Select;
            window.Root.MouseMove         -= docItem.CheckIsHovered;
            window.Root.KeyDown           -= docItem.KeyDownHandler;

            UC_Collections.DeleteDocItem(docItem);
        }
예제 #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // UCDocItems
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public static void UnitTest_DocItems()
        {
            UC_Collections.DocItems.Clear();
            string     _name       = "CustomSideBar";
            string     _fName      = "CustomSideBar.winDirectory";
            string     _path       = @"C:\Users\Aji Suprana\Documents\Projects\Applications\20180314_WPFCustomSideBar\CustomSideBar";
            UC_DocItem newDocPanel = UC_DocItem.Add(_name, _path, _fName, FileFormats.folder);

            _name  = "Test123";
            _fName = "Test123.winDirectory";
            _path  = @"C:\Users\Aji Suprana\Documents\Projects\Applications\20180314_WPFCustomSideBar\Test123";
            UC_DocItem newDocPanel1 = UC_DocItem.Add(_name, _path, _fName, FileFormats.folder);

            //newDocPanel.Serialize();

            JObject testResult = UC_Collections.SerializeDocItems();

            Console.WriteLine("[UC_Collections][UnitTest_DocItems]");
            Console.WriteLine(testResult.ToString());
        }