private void frmMain_Shown(object sender, EventArgs e)
 {
     if (OpenAssemblyWithClassEditor(this.Arguments) > 0)
     {
         //argument loaded
     }
     else
     {
         //set last path, need to be after settings upgraded
         if (!String.IsNullOrEmpty(Config.LastPath) && Directory.Exists(Config.LastPath))
         {
             TreeViewHandler.SetPath(Config.LastPath, true);
         }
     }
 }
        private int OpenAssemblyWithClassEditor(string[] files)
        {
            int count = 0;

            if (files == null || files.Length == 0)
            {
                return(count);
            }

            string path = files[0];

            if (Directory.Exists(path))
            {
                TreeViewHandler.SetPath(path, true);
                count++;
            }
            else
            {
                if (File.Exists(path))
                {
                    string filePath = Path.GetDirectoryName(path);
                    TreeViewHandler.SetPath(filePath, true);
                    TreeViewHandler.CheckDropFile(path);
                    count++;
                }
            }
            for (int i = 1; i < files.Length; i++)
            {
                path = files[i];
                if (File.Exists(path))
                {
                    TreeViewHandler.CheckDropFile(path);
                    count++;
                }
            }
            return(count);
        }