Thursday, January 14, 2016
Sometimes on server side we need to draw some reports to our domain folder,
If we already inside dotnet area we can simplify the process with simple dotnet framework.
Using HtmlTextWriter can do the work and very easily , just assume that you know something or two about html, and the hierarchical structure of it, than you can continue from this struct to develop any webpage you need, start html tag , header body etc, of course can insert any css or js references,
Just do not forget to close any opened tags, so as a demo :
private static string lines...
Tuesday, September 16, 2014
,Probably the most popular way to using Json format to/from C# is by Json.Net library
This is an great 3party package with great demos and open-source solution, you can download
:the full lib from here
http://james.newtonking.com/json:
or from codeplex
https://json.codeplex.com/
.or directly from visual studio Nuget console
Anyway, for read/ write to/from Json format I where show the DataContractJsonSerializer usage
:in my former json serialization post
http://blogs.microsoft.co.il/uriel99/2014/04/27/c-serialization-guide-part-6-json/
.but using Json.Net Library is very good alternative
After you download the files all you need is the proper dll from binary folder for example
,the .Net4.5 version. And add it as reference to you project
You can use the service either on local file...
Saturday, May 31, 2014
אפליקציות רבות תומכות בהחלפת מראה ו\או התנהגות בלחיצה על כפתור. כדי שהתכנית שלכם תתמוך ביכולת כזאת יש צורך בתכנון מראש.
זה אולי לא ממש Pattern אבל די נפוץ באפליקציות בכל פלטופרמה שהיא
הרעיון הוא להתאים מראה שונה למשתמש בלחיצה אחת. הבעיה פה היא:
א. טכנית החלפת UI (נניח צבע רקע כדוגמא בסיסית).
ב. אני לא יכול מהVM לפנות לView כי אז אני שובר ארכיטקטורה! אבל נתעלם מזה כרגע
למקרה ששכחנו את יסודות הMVVM הקשר בין VM ל VIEW הוא באמצעות binding ואין כיום טכנולוגיית binding שיודעת להחליף resource. בצורה ישירה (על Dynamic נדבר בהמשך)
בוא נניח שיש לי מצב Dark ומצב Light לתכנית שלי, נתחיל...
Sunday, April 27, 2014
Json is a nice transmission protocol based simple text which is popular especially on web
.services , but C# could also serilize for Json format
The main benefit of using C# to Json is the javaScript – Ajax built in supported to deserialized
.those files
:So , lets get back to our serialization contract
public interface ISerializeService
{
bool write(object data, Type type, string path);
object read(string path, Type t);
}
,And we needs some data object to test
pay attention to DataContract and DataMember attributes
...