Example #1
0
        private void  SQLdeserialize()
        {
            string UserAnswer = Microsoft.VisualBasic.Interaction.InputBox("Wprowadz sciezke ", "Serialization", "");

            if (UserAnswer == "")
            {
                MessageBox.Show("nic nie wprowadziles");
            }
            else
            {
                string path = UserAnswer;
                _visibility = Visibility.Visible;
                RaisePropertyChanged("ChangeControlVisibility");
                RaisePropertyChanged("PathVariable");
                log.Info("Deserializowano Assembly: " + path);
                flog.Log("Deserializowano Assembly: " + path);
                HierarchicalAreas.Clear();

                SQLDeserialization ss = new SQLDeserialization();
                assemblyMetadata = ss.Deserialize(path);
                pathVariable     = "DeserializedSQLItems";
                // assemblyMetadata.IsExpanded = true;
                TreeViewLoaded(assemblyMetadata);
            }
        }
Example #2
0
        private void Jsondeserialize()
        {
            OpenFileDialog test = new OpenFileDialog();

            test.Filter = "Text files (*.txt)|*.txt";
            test.ShowDialog();
            if (test.FileName.Length == 0)
            {
                MessageBox.Show("No files selected");
                log.Info("Wybrano pusty plik: ");
                flog.Log("Wybrano pusty plik: ");
            }
            else
            {
                string path = test.FileName;
                _visibility = Visibility.Visible;
                RaisePropertyChanged("ChangeControlVisibility");
                RaisePropertyChanged("PathVariable");
                log.Info("Deserializowano plik: " + path);
                flog.Log("Deserializowano plik: " + path);
                HierarchicalAreas.Clear();
                assemblyMetadata = des.Deserialize(path);
                //  SqlSerialization ss = new SqlSerialization();
                //   assemblyMetadata = ss.Deserialize(2);
                pathVariable = "DeserializedJsonItems";
                TreeViewLoaded(assemblyMetadata);
            }
        }
Example #3
0
 public void OnEditDeserialize(IDeserialize objDeserialize)
 {
     assemblyMetadata = (AssemblyMetadata)objDeserialize.Deserialize();
     pathVariable     = objDeserialize.ToString();
     HierarchicalAreas.Clear();
     TreeViewLoaded(assemblyMetadata);
     MessageBox.Show(objDeserialize.ToString());
 }
Example #4
0
        public void Deserialize()
        {
            string pathToSerializedFile = FilePathProvider.Browse();

            if (pathToSerializedFile != null)
            {
                Reflector = new Reflector();
                Reflector.DeserializeAssembly(pathToSerializedFile);

                HierarchicalAreas.Clear();
                TreeViewLoaded();
            }
        }
Example #5
0
        private void Deserialize()
        {
            string path = ConfigurationManager.AppSettings["connectionstring"];

            if (ConfigurationManager.AppSettings["repository"] != "Database")
            {
                path = browse.GetFilePath();
            }
            BaseTreeViewItem rootItem = new AssemblyTreeViewItem(RepositoryOperations.Read(path));

            HierarchicalAreas.Clear();
            HierarchicalAreas.Add(rootItem);
        }
Example #6
0
 public bool LoadDLL()
 {
     Logger.Log("Loading DLL.");
     HierarchicalAreas.Clear();
     if (PathVariable.Length > 4 && (PathVariable.Substring(PathVariable.Length - 4) == ".dll" || PathVariable.Substring(PathVariable.Length - 4) == ".exe"))
     {
         Reflector = new Reflector(PathVariable);
         TreeViewLoaded();
         Logger.Log("File loaded to treeview.");
         return(true);
     }
     else
     {
         Logger.Log("File failed when loading from path");
         return(false);
     }
 }