Exemple #1
0
        /// <summary>
        ///     Input a list of coordinates into the DED
        /// </summary>
        /// <param name="Items">List of Coordinates to input</param>
        public void inputCoordinateToDED(System.Windows.Controls.ItemCollection Items)
        {
            foreach (DCSKeyPress.MainWindow.Coordinate coord in Items)
            {
                // RET to ensure we are on the main DED page
                pressRET();
                pressRET();

                // Open the STPT Page
                inputSequence("4");

                // Select Sequence
                inputSequence(coord.id);
                pressDCS_DOWN();

                // Input LATITUDE
                inputSequence(coord.latitude);
                pressDCS_DOWN();

                // Input LONGDITUDE
                inputSequence(coord.longditude);
                pressDCS_DOWN();

                // Input ELEVATION
                inputSequence(coord.elevation);
            }
        }
 public void changeCheckVideos(bool isTrue)
 {
     System.Windows.Controls.ItemCollection a = addVideos.Items;
     foreach (Video vid in addVideos.Items)
     {
         vid.position.check = isTrue;
     }
     kolejka.Items.Refresh();
 }
        private string _Characters_Species_Get()
        {
            string returnString = "";

            System.Windows.Controls.ItemCollection _lstItems = ((PageMain)MainWindow.activePage).listboxCharacters.Items;

            for (int x = 0; x < _lstItems.Count; x++)
            {
                returnString += "(" + _lstItems[x].ToString().Split('-')[1] + ")";
            }

            return(returnString);
        }
Exemple #4
0
        /// <summary>
        /// Method to remove a users participation in a document - the document still lives on the server, but the currently online user can no longer access it
        /// </summary>
        /// <param name="item">TreeViewItem represetation of the item which is to be removed</param>
        /// <param name="items">An item collection which contains the soon to be removed document</param>
        public void DeleteDocument(System.Windows.Controls.TreeViewItem item, System.Windows.Controls.ItemCollection items)
        {
            //get document id for the file
            int documentId = Metadata.FetchDocumentIDFromFileContent(localPersistence.GetFileContent(item.Tag.ToString()));

            using (ServiceReference.Service1Client proxy = new ServiceReference.Service1Client())
            {
                //delete the users document reference
                proxy.DeleteDocumentReference(session.UserID, documentId);
            }
            //delete the file locally
            localPersistence.DeleteFile(item.Tag.ToString());
            UpdateExplorerView();
        }
        public void DragEnd(IDragDropToTabWindow dragWin)
        {
            if (dragWin == null)
            {
                return;
            }

            Win32Helper.Win32Point p = new Win32Helper.Win32Point();
            if (!Win32Helper.GetCursorPos(ref p))
            {
                return;
            }

            Point dragWinPosition = new Point(p.X, p.Y);

            foreach (IDragDropToTabWindow targetWin in _dragEnteredWindows)
            {
                if (targetWin.IsDragMouseOverTabZone(dragWinPosition))
                {
                    System.Windows.Controls.ItemCollection items = ((ITabWindow)dragWin).TabItems;
                    for (int i = 0; i < items.Count; i++)
                    {
                        System.Windows.Controls.TabItem item = items[i] as System.Windows.Controls.TabItem;
                        if (item != null)
                        {
                            ((ITabWindow)targetWin).AddTabItem(item.Header.ToString(), (System.Windows.Controls.Control)item.Content);
                        }
                    }
                    for (int i = items.Count; i > 0; i--)
                    {
                        System.Windows.Controls.TabItem item = items[i - 1] as System.Windows.Controls.TabItem;
                        if (item != null)
                        {
                            ((ITabWindow)dragWin).RemoveTabItem(item);
                        }
                    }
                }
                targetWin.OnDrageLeave();
            }
            if (_dragEnteredWindows.Count > 0 && ((ITabWindow)dragWin).TabItems.Count == 0)
            {
                ((Window)dragWin).Close();
            }

            _dragEnteredWindows.Clear();
        }
Exemple #6
0
        private void ConvertToolStripMenuItems(System.Windows.Controls.ItemCollection sourceItems, ToolStripItemCollection destinationItems)
        {
            foreach (System.Windows.Controls.Control Item in sourceItems)
            {
                if (Item is System.Windows.Controls.MenuItem AsMenuItem)
                {
                    if (AsMenuItem.Items.Count > 0)
                    {
                        AddSubmenuItem(destinationItems, AsMenuItem);
                    }
                    else
                    {
                        AddMenuItem(destinationItems, AsMenuItem);
                    }
                }

                else if (Item is System.Windows.Controls.Separator AsSeparator)
                {
                    AddSeparator(destinationItems);
                }
            }
        }
 private string _Character_Species_Get()
 {
     System.Windows.Controls.ItemCollection _lstItems = ((PageMain)MainWindow.activePage).listboxCharacters.Items;
     return("(" + _lstItems[0].ToString().Split('-')[1] + ")");
 }
Exemple #8
0
 /// <summary>
 /// Loads all documents and folders in the item collection to the tree view.
 /// </summary>
 /// <param name="items"></param>
 public void LoadFilesAndFolders(System.Windows.Controls.ItemCollection items)
 {
     TreeViewModel.GetInstance().LoadFilesAndFolders(items);
 }