Exemplo n.º 1
0
        private void btnOpen_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            openType = Common.OpenType.Open;

            GC.Collect();
            if (OFD.ShowDialog() == DialogResult.OK)
            {
                FilePath = OFD.FileName;
                switch (Path.GetExtension(FilePath).ToLower())
                {
                case ".wtl":
                    libraryType = Common.LibraryType.WTLLibrary;
                    OpenWTLLibrary();
                    break;

                case ".lib":
                    libraryType = Common.LibraryType.CSharpLibraryV2;
                    OpenCSharpV2Library();
                    break;

                default:
                    libraryType = Common.LibraryType.WeMadeLibrary;
                    OpenWeMadeLibrary();
                    break;
                }
            }
            // GC.Collect();
        }
Exemplo n.º 2
0
        public TfmLibrary(string Path, Common.OpenType OpenType, Common.LibraryType LibraryType)
        {
            FilePath    = Path;
            openType    = OpenType;
            libraryType = LibraryType;

            InitializeComponent();

            // Initialize OpenFileDialog
            OFD.Filter = Common.OpenFileDialogFilter;

            switch (LibraryType)
            {
            case Common.LibraryType.None:
                break;

            case Common.LibraryType.CSharpLibraryV1:
                break;

            case Common.LibraryType.CSharpLibraryV2:
                OpenCSharpV2Library();
                break;

            case Common.LibraryType.WeMadeLibrary:
                OpenWeMadeLibrary();
                break;

            case Common.LibraryType.WTLLibrary:
                OpenWTLLibrary();
                break;

            default:
                break;
            }
        }