Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/Somali/BaseClass/SomaliActionArgs.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 95 - (show annotations) (download)
Sun Nov 28 06:24:47 2010 UTC (13 years, 5 months ago) by juan
File size: 1925 byte(s)
mod ExplorerForm with able to open dirTree
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace Somali.Base
7 {
8 public enum SomaliAction
9 {
10 Exit,
11 ShowExplorer,
12 ShowOutlineAnalizer,
13 OpenSolution,
14 OpenDir,
15 OpenFile,
16 JumpLine,
17 ExpandExplorerNode,
18 ApplyPreferences,
19
20 }
21
22 public class SomaliActionArgs : EventArgs
23 {
24 private SomaliAction _actionID;
25 public SomaliAction ActionID
26 {
27 get { return this._actionID; }
28 }
29
30 private object _arg;
31 public object Arg
32 {
33 get { return this._arg; }
34 }
35
36 private Type _argType;
37 public Type ArgType
38 {
39 get { return this._argType; }
40 }
41
42 private string _path;
43 public string Path
44 {
45 get { return this._path; }
46 }
47
48 private ulong _lineNum;
49 public ulong LineNumber
50 {
51 get { return this._lineNum; }
52 }
53
54 public SomaliActionArgs( SomaliAction actionID )
55 : this( actionID, null ) { }
56
57 public SomaliActionArgs( SomaliAction actionID, object arg )
58 {
59 this._actionID = actionID;
60 this._arg = arg;
61 this._argType = (arg == null ? null : arg.GetType());
62
63 this._path = String.Empty;
64 this._lineNum = 0UL;
65
66 switch ( actionID )
67 {
68 case SomaliAction.OpenSolution:
69 case SomaliAction.OpenDir:
70 case SomaliAction.OpenFile:
71 this._path = arg.ToString();
72 break;
73 case SomaliAction.JumpLine:
74 UInt64.TryParse( arg.ToString(), out this._lineNum );
75 break;
76 }
77 }
78
79 }
80 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26