private void Delete_Userlnk(object sender, RoutedEventArgs e)
        {
            UserLinkListXML userlinklistxml = new UserLinkListXML();
            userlinklistxml.DeleteUserLink(name, path);

            Application.Current.Properties["DeleteUserlnk"] = true;
        }
        private void CreateLinkFile(object sender, RoutedEventArgs e)
        {
            System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog() { DereferenceLinks = false };

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                GetlnkPath getlnkpath = new GetlnkPath();
                string path = getlnkpath.GetTargetPath(dlg.FileName);
                string[] name = new string[2];
                name = dlg.SafeFileName.Split('.');

                if (path == null)
                {
                    path = dlg.FileName;
                }

                UserLinkListXML userlinklistxml = new UserLinkListXML();
                if (userlinklistxml.SaveUserLink(name[0], path)) { }
                else
                    System.Windows.Forms.MessageBox.Show("동일한 바로가기가 존재합니다");

                Application.Current.Properties["AddUserlnk"] = true;
            }
        }
        private void SetUSerLinkList()
        {
            UserLinkListXML userlinklistxml = new UserLinkListXML();
            ArrayList userlinklist = userlinklistxml.LoadUserLink();
            MainStack.Children.Clear();

            ParentsPanel.Width = 5;
            MainStack.Width = 5;
            iconbackboard.Width = 25;
            iconbackboard2.Width = 40;
            iconground.Width = 0;

            for (int i = 0; i < userlinklist.Count; i++)
            {
                string linkpath = Convert.ToString(userlinklist[i]);

                string[] userlink = new string[2];
                userlink = linkpath.Split('\a');

                string ExeName = userlink[1].Substring(userlink[1].LastIndexOf("\\") + 1);

                string pullpath = userlink[1].TrimEnd('\\');
                pullpath = userlink[1].Remove(userlink[1].LastIndexOf('\\') + 1);

                try
                {
                    DirectoryInfo di = new DirectoryInfo(pullpath);

                    foreach (FileInfo file in di.GetFiles())
                    {
                        if (string.Compare(ExeName, file.Name) == 0)
                        {
                            ParentsPanel.Width += 55;
                            MainStack.Width += 55;
                            iconbackboard.Width += 55;
                            iconbackboard2.Width += 55;
                            iconground.Width += 55;

                            UserSetUtil usercreatelink = new UserSetUtil(userlink);

                            Thickness newMargin = new Thickness(5);
                            usercreatelink.Margin = newMargin;

                            MainStack.Children.Add(usercreatelink);

                            break;
                        }
                    }
                }
                catch
                {
                }
            }

            if (Application.Current.Properties["DeleteUserlnk"] != null)
            {
                Application.Current.Properties.Remove("DeleteUserlnk");
            }
            else if (Application.Current.Properties["AddUserlnk"] != null)
            {
                Application.Current.Properties.Remove("AddUserlnk");
            }

        }